package com.common.window
{
	import com.common.buttons.Button;
	import com.common.displayObjects.ComponentChildren;
	
	import flash.display.Graphics;
	
	public class Panel extends ComponentChildren
	{
		public var btnClose:Button;
		public function Panel(_w:Number, _h:Number)
		{
			super(_w, _h);
			createChildren();
		}
		override protected function createChildren():void
		{
			btnClose = new Button();
			btnClose.x = width - btnClose.width - 2;
			btnClose.y = 2;
			addChild(btnClose);
			
			var g:Graphics = graphics;
			g.beginFill(0x00);
			g.drawRoundRect(0, 0, width, height, 4, 4);
			g.beginFill(0xff, 0.5);
			g.drawRoundRect(1, 1, width - 2, height - 2, 4, 4);
			g.endFill();
		}
	}
}